package com.suxin.exception.bussine;

/**
 * @author Tang
 * @classname ResponseStatus
 * @description [  ]
 * @date 2022/10/12 12:01
 */
public enum ResponseStatus {
    SUCCESS(200, "interface call successful"),
    FAIL(400, "internal server error, please try later"),
    ARGS_ERROR(400, "interface parameter error"),
    UNAUTHORIZED(401, "interface unauthorized"),
    FORBIDDEN(403, "interface forbidden"),
    NOT_FOUND(404, "interface not exist"),
    ERROR(500, "interface call error"),
    FALLBACK(999, "interface fallback"),
    NOT_EXIST(410, "account not exist"),
    IS_EXIST(411, "account is exist"),
    INFO_ERROR(412, "information of account error"),
    WAIT_FOR_APPROVE(420, "authority wait for approve"),
    REJECTED(421, "authority to approve rejected"),
    FREEZE(422, "authority be frozen"),
    FIRM_WAIT_FOR_APPROVE(430, "firm authority wait for approve"),
    FIRM_REJECTED(431, "firm authority to approve rejected"),
    FIRM_FREEZE(432, "firm authority be frozen"),
    FIRM_NOT_EXIST(433, "firm account not exist"),
    FIRM_IS_EXIST(434, "firm account is exist"),
    REFRESH_TOKEN(438, "token refreshed"),
    DUPLICATE_KEY(439, "duplicate key"),
    MAXIMUM_UPLOAD_SIZE_EXCEEDED(440, "文件超出大小"),
    HTTP_MEDIA_TYPE_NOT_SUPPORTED(441, "请求的mediaType错误");

    private int code;
    private String message;

    private ResponseStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
